import {createRouter,createWebHashHistory} from 'vue-router'
import {constantRoute} from "./routes";

// 创建路由器
const router = createRouter({
    history:createWebHashHistory(),
    routes:constantRoute,
    // 滚动条行为，让页面跳转时页面的滚动条位置为最上方
    scrollBehavior(){
        return {
            left:0,
            top:0
        }
    }
})

export default router